import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

import '../common/style.dart';

class AcAppbar extends AppBar {
  AcAppbar({
    super.key,
    required String title,
    bool showBackButton = true,
    List<Widget>? actions,
  }) : super(
          title: Text(
            title,
            style: TextStyle(
              color: textColorBlack,
              fontSize: 18.sp,
              fontFamily: 'Inter',
              fontWeight: FontWeight.w400,
            ),
          ),
          leading: showBackButton
              ? IconButton(
                  onPressed: () {
                    Get.back();
                  },
                  icon: Image.asset(
                    "images/back.png",
                    width: 20.w,
                    height: 16.w,
                  ),
                )
              : null,
          centerTitle: true,
          backgroundColor: Colors.white,
          elevation: 0.0,
          actions: actions,
        );
}
